#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QTimer>
#include <QtGui>
#include <simulateur/stdafx.h>
#include "simulateur/VarState.h"
#include <vector>
#include <algorithm>

using namespace std;

namespace Ui {
    class MainWindow;
};

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private slots:
    void on_actionOuvrir_triggered();

    void on_tempsReel_clicked();

    void on_fastest_clicked();

    void doStep();

    void on_freq_valueChanged(int arg1);

    void on_actionOuvrir_entr_e_triggered();

    void on_actionOuvrir_programme_triggered();

    void on_actionSuivre_RAM_triggered();

    void on_actionSuivre_ROM_triggered();

    void updateNames();
    
private:
    QTime time;
    int nVars;
    bool first;
    double nbOp;
    int last;
    unordered_map<string,int> correspondance;
    vector<VarState> entree,sortie;
    vector<Variable> vars;
    vector<int> ramTracked,romTracked;
    vector< vector<bool> > valEntree;
    int curStep;
    QTimer clock;
    bool going,goingFast;
    Ui::MainWindow *ui;
};

#endif // MAINWINDOW_H
